package com.cro.prison.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cro.prison.entity.pojo.ErrorMessage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ErrorMessageDao extends BaseMapper<ErrorMessage> {

    @Select( "SELECT\n" +
            "\tid AS id,\n" +
            "\tcreate_time AS createTime,\n" +
            "\tdevice_id AS deviceId,\n" +
            "\tdescription AS description,\n" +
            "\tidentity AS identity,\n" +
            "\ttype AS type,\n" +
            "\tis_valid AS isValid,\n" +
            "\tuser_id AS userId,\n" +
            "\tstatus,\n" +
            "\tdepart_id AS departId,\n" +
            "\tvideo_src AS videoSrc\n" +
            "FROM\n" +
            "\terror_message_detail\n" +
            "\torder by create_time desc")
    public List<ErrorMessage> list();




}
